package com.wing.cabinet.controller.admin;


import com.wing.cabinet.service.AddAlarmDataService;
import com.wing.common.utils.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Validated
@Api(value = "Admin-告警数据添加", tags = "#/cabinet/addAlarmData")
@RestController("addAlarmDataController")
@RequestMapping("cabinet/admin/addAlarmData")
@RequiredArgsConstructor
@Component
public class AddAlarmData {


    private final AddAlarmDataService addAlarmDataService;

    @ApiOperation(value = "添加库存告警数据", notes = "添加")
//    @Scheduled(cron = "0 0/5 * * * ? ")//秒 分 时 日 月 星期 年
    @GetMapping(value = "/addAlarmData")
    public JsonResult  addAlarmData(){
        return addAlarmDataService.addAlarmData();
    }
}
